home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 17
/
AMIGAplus Sonderheft 17 (1999)(ICP)(DE)[!].iso
/
PD
/
Anwendungen
/
Heddley
/
Archive
/
editnode.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-08-29
|
2KB
|
41 lines
/* editnode.rexx */
/* by Edd Dumbill */
/* 2 July 1994 */
/* grabs a document from Heddley into GoldED */
/* use this macro as a basis for interfacing with other aynschronous */
/* text editors. */
OPTIONS RESULTS /* enable return codes */
if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
address 'GOLDED.1'
'LOCK CURRENT' /* lock GUI, gain access */
OPTIONS FAILAT 6 /* ignore warnings */
SIGNAL ON SYNTAX /* ensure clean exit */
SIGNAL ON FAILURE /* trap Heddley errors */
address 'HEDDLEY.1' /* talk to Heddley */
EDIT SAVETEXT 'T:temp_node' /* save document to temporary file */
lock /* lock Heddley's front panel */
address 'GOLDED.1' /* talk to GoldED */
open new 't:temp_node' /* load in document */
'UNLOCK' /* VERY important: unlock GUI */
EXIT /* quit this macro */
SYNTAX: /* ARexx error... */
SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) /* report it... */
UNLOCK /* unlock GUI */
EXIT /* exit */
FAILURE: /* Heddley error... */
ERRV=address().LASTERROR /* get name of error var. */
SAY "Error:" VALUE(ERRV) /* report the error */
ADDRESS GOLDED.1 /* talk to GoldED */
UNLOCK /* unlock GUI */
EXIT /* exit */